﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Runtime.Serialization;
namespace CodeReadr
{
    [DataContract]
    public class UserDetails
    {
        [DataMember]
        public string UserName { get; set; }
        private string _password;
      
        [DataMember]
        public string Password { set { _password = value; } }

        [DataMember]
        public UserAccessDetails UserAccess { get; set; }

        [DataMember]
        public string EmailId { get; set; }
       
        [DataMember]
        public string LastLoginLocation { get; set; }

        private bool _isValidated; 
        [DataMember]
        public bool IsUserValidated { get { return _isValidated; } set { } }

        [DataMember]
        public string LoginMessage { get; set; }
       
        public UserDetails()
        {

        }

       
        public void IsValidUser()
        {
          //  CodeReadr.BusinessEntities.UserOperations _uOps = new CodeReadr.BusinessEntities.UserOperations();
          //  UserDetails _usr = _uOps.ValidateUser(UserName, _password);
        }

        public string AddUser()
        {
            return "";
        }
        
    }

     [DataContract]
    public class UserAccessDetails
    {
        public List<string> Databases { get; set; }
        public List<string> Services { get; set; }
    }
}